﻿using baroIstatistik.Class;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace baroIstatistik
{
    public partial class ayarlarim_m : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                HttpCookie cok = Request.Cookies["uyebilgileri"];
                user u = new user(Convert.ToInt32(cok.Values["userid"]));

                u.getir();


                lblAdSoyad.Text = u.Name + " " + u.Surname;




            }
            catch (Exception)
            {

                throw;
            }
        }

        protected void sifredegistir_Click(object sender, EventArgs e)
        {

            try
            {


                user u = new user(Convert.ToInt32(Session["userID"]));
                u.getir();
                if (sifre.Text == sifre2.Text)
                {
                    u.Pass = sifre.Text;
                    u.guncelle();
                }

                Response.Redirect("basarili.aspx?mes=3");
            }
            catch (Exception)
            {


            }

        }

        protected void BtUyeEkle_Click(object sender, EventArgs e)
        {
            Response.Redirect("uye_ekle.aspx");
        }

        protected void BtAnasayfa_Click(object sender, EventArgs e)
        {
            Response.Redirect("yeni_kayit.aspx");
        }
    }
}